{include file="public/header" /}

<body>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="layui-card-body">
            <fieldset id="searchFieldset_currentTableRenderId" class="table-search-fieldset">
              <legend>条件搜索</legend>
              <form class="layui-form layui-form-pane form-search">
                <div class="layui-form-item layui-inline">
                  <label class="layui-form-label">类型</label>
                  <div class="layui-input-inline">
                    <select name="type">
                      <option value="">选择类型</option>
                      {foreach $typepeople as $k => $v}
                      <option value="{$k}" {if !empty(input('get.type')) && input('get.type')==$k}selected{/if}>
                        {$v|default=''}</option>
                      {/foreach}
                    </select>
                  </div>
                </div>
                <div class="layui-form-item layui-inline">
                  <label class="layui-form-label">关键字</label>
                  <div class="layui-input-inline">
                    <input type="hidden" name="id" value="{:input('get.id')}" />
                    <input type="text" name="title" placeholder="搜索账号|备注" value="{:input('get.title')}"
                      autocomplete="off" class="layui-input" />
                  </div>
                </div>
                <div class="layui-form-item layui-inline">
                  <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="sreach">
                    搜索
                  </button>
                </div>
              </form>
            </fieldset>
          </div>
          <div class="layui-card-body layui-row layui-col-space10">
            共有数据：<strong id="count">{$list->total()|default='0'}</strong> 条
          </div>
          <div class="layui-table-body layui-table-main">
            <table class="layui-table">
              <thead>
                <tr>
                  <th>
                    <div class="layui-table-cell">ID</div>
                  </th>
                  <th>
                    <div class="layui-table-cell">类型</div>
                  </th>
                  <th>
                    <div class="layui-table-cell">账号</div>
                  </th>
                  <th>
                    <div class="layui-table-cell">联系电话</div>
                  </th>
                  <th>
                    <div class="layui-table-cell">操作</div>
                  </th>
                </tr>
              </thead>
              <tbody>
                {foreach $list as $v}
                <tr>
                  <td>
                    <div class="layui-table-cell">{$v.id}</div>
                  </td>
                  <td>
                    <div class="layui-table-cell">{$v.type_text}{if $v.type == 3}{if $v.sonstype == 1 }[经理]{/if}{if
                      $v.sonstype == 2 }[助理]{/if}{/if}{if $v.type == 2}{if $v.sonstype == 1 }[督导]{/if}{if
                      $v.sonstype == 2 }[专员]{/if}{/if}</div>
                  </td>
                  <td>
                    <div class="layui-table-cell">{$v.account}</div>
                  </td>
                  <td>
                    <div class="layui-table-cell">{$v.mobile}</div>
                  </td>
                  <td class="layui-table-col-special">
                    {if $v.read == 1}
                    <a title="发送未阅读通知" onclick="open_status(this,'/system/annous_message','{$v.id}', '{$v.readid|default=0}', '确定发送通知')" href="javascript:;"
                      class="layui-btn-danger layui-btn layui-btn-sm">
                      发送未阅读通知
                    </a>
                    {elseif $v.read == 2}
                    <a title="已读" href="javascript:;" class="layui-btn layui-btn-sm">
                      已读
                    </a>
                    {else}
                    <a title="无权限" href="javascript:;" class="layui-btn layui-btn-sm layui-btn-info">
                      无权限
                    </a>
                    {/if}
                  </td>
                </tr>
                {/foreach}
              </tbody>
            </table>
          </div>
          <div class="layui-card-body">
            <div class="page">{$list->render()|raw}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
  {include file="public/footer"}
</body>